<?php 
$show_validator = true;
include TMPL_PATH.'public/header.phtml';
?>
<script type="text/javascript">
<!--
	$(function(){
		$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
		$("#order_frefix").formValidator({onshow:"请输入订单号前缀",onfocus:"订单号前缀应该为4位字母或数字"}).inputValidator({min:4,max:4,onerror:"订单号前缀应该为4位字母或数字"}).regexValidator({regexp:"\\w[4]?$",onerror:"订单号前缀应该为4位字母或数字"});;
			
	})
//-->
</script>
<script type="text/javascript">
function radioselect(obj)
{
	if(obj.value==1)
	{
		$('#user_sharing_rate').show();
		$('#user_sharing_fix').hide();
	}
	else
	{
		$('#user_sharing_fix').show();
		$('#user_sharing_rate').hide();
	}
}
</script>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
        <a href='<?php echo U('order/order_list');?>'><em>订单列表</em></a><span>|</span>
        <a href='javascript:;' class="on" ><em>订单配置</em></a></div>
</div>

<div class="pad-10">
<form action="__SELF__" method="post" id="myform">
<div class="col-tab">
<div class="contentList pad-10">
<table width="100%"  class="table_form">
  <tr>
    <th width="120">订单号前缀：</th>
    <td class="y-bg">
     <input type="text" class="input-text" name="order_prefix" id="order_frefix" value="<?php echo isset($config['order_prefix']) && $config['order_prefix'] ? $config['order_prefix'] : null;?>" /><div class="infoShow">最长只能4个字符</div>
	</td>
	<tr>
    <th width="120">启动余额支付：</th>
    <td class="y-bg">
     <input type="radio" name="is_use_surplus_money" value="1" <?php if(! isset($config['is_use_surplus_money']) || (isset($config['is_use_surplus_money']) && $config['is_use_surplus_money']==1))echo'checked';?> /><label>是</label>&nbsp;&nbsp;<input type="radio" name="is_use_surplus_money" value="0" <?php if(isset($config['is_use_surplus_money']) && $config['is_use_surplus_money']==0)echo'checked';?> /><label>否</label>
	</td>
	</tr>
	<tr>
    <th width="120">启动消费积分支付：</th>
    <td class="y-bg">
     <input type="radio" name="is_use_integral" value="1" <?php if(! isset($config['is_use_integral']) || (isset($config['is_use_integral']) && $config['is_use_integral']==1))echo'checked';?> /><label>是</label>&nbsp;&nbsp;<input type="radio" name="is_use_integral" value="0" <?php if(isset($config['is_use_integral']) && $config['is_use_integral']==0)echo'checked';?> /><label>否</label><div class="infoShow">开启后会员可以使用积分支付订单</div>
	</td>
	</tr>
	<tr>
    <th> 积分换算比例：</th>
    <td class="y-bg">
     <input name="integral_scale" class="input-text" id="integral_scale" value="<?php echo isset($config['integral_scale']) && $config['integral_scale'] ? $config['integral_scale'] : 1;?>" /><div class="infoShow">每100积分可抵多少元现金</div>
	</td>
	</tr>
	<tr>
    <th>  积分支付比例：</th>
    <td class="y-bg">
     <input name="integral_percent" class="input-text" id="integral_percent" value="<?php echo isset($config['integral_percent']) && $config['integral_percent'] ? $config['integral_percent'] : 1;?>" /><div class="infoShow">每100元商品最多可以使用多少元积分</div>
	</td>
	</tr>
	<tr>
    <th width="120">充值结果自动修改：</th>
    <td class="y-bg">
     <input type="radio" name="is_user_account_true" value="1" <?php if(! isset($config['is_user_account_true']) || (isset($config['is_user_account_true']) && $config['is_user_account_true']==1))echo'checked';?> /><label>是</label>&nbsp;&nbsp;
     <input type="radio" name="is_user_account_true" value="0" <?php if(isset($config['is_user_account_true']) && $config['is_user_account_true']==0)echo'checked';?> /><label>否</label><div class="infoShow">当会员充值返回结果自动修改，余额自动增加</div>
	</td>
	</tr>
	<tr>
    <th>订单金额：</th>
    <td class="y-bg">
     <input name="order_amount_gt_address" class="input-text" id="order_amount_gt_address" value="<?php echo isset($config['order_amount_gt_address']) && $config['order_amount_gt_address'] ? $config['order_amount_gt_address'] : null;?>" /><div class="infoShow">当订单金额大于多少时启用第二送货地址</div>
	</td>
	</tr>
	<tr>
    <th>晒单送积分：</th>
    <td class="y-bg">
     <input name="order_shaidan_jifen" class="input-text" id="order_shaidan_jifen" value="<?php echo isset($config['order_shaidan_jifen']) && $config['order_shaidan_jifen'] ? $config['order_shaidan_jifen'] : null;?>" /><div class="infoShow">当用户晒单后送积分</div>
	</td>
	</tr>
	<tr>
	<th width="120">设计师分成费用设置：</th>
		<td>
			<label><input type="radio" name="user_sharing_type" value="1" <?php if(!isset($config['user_sharing_type']) || $config['user_sharing_type']==1)echo'checked="checked"';?> onclick="radioselect(this)">按销售金额百分比收费</label>&nbsp;&nbsp;
			<label><input type="radio" name="user_sharing_type" value="2" <?php if(isset($config['user_sharing_type']) && $config['user_sharing_type']==2)echo'checked="checked"';?> onclick="radioselect(this)">按销售件数收费</label>
		</td>
	</tr>
	<tr id="user_sharing_rate" style="display: <?php echo (!isset($config['user_sharing_type']) || $config['user_sharing_type']==1) ? 'table-row' : 'none';?>;">
		<th></th>
		<td>
			费率：<input type="text" size="5" class="input-text" name="user_sharing_rate" value="<?php echo isset($config['user_sharing_rate']) ? $config['user_sharing_rate'] : 1;?>">% &nbsp;&nbsp; 说明：设计师将收取订单中作品总金额乘以此费率作为分成费；
		</td>
	</tr>
	<tr id="user_sharing_fix" style="display: <?php echo (isset($config['user_sharing_type']) && $config['user_sharing_type']==2) ? 'table-row' : 'none';?>;">
		<th></th>
			<td>
				金额：<input type="text" size="5" class="input-text" name="user_sharing_fix" value="<?php echo isset($config['user_sharing_fix']) ? $config['user_sharing_fix'] : 0;?>">元 &nbsp;&nbsp; 说明：设计师将收取订单中作品件数乘以价格作为分成费；
			</td>
	</tr>
	
  </table>
</div>

<div class="bk15"></div>
<input name="dosubmit" type="submit" class="button" value="提交" class="button">
</div>
</form>
</div>

</body>
</html>
